package com.itheima.service.impl;

import com.itheima.entity.User;
import com.itheima.service.UserService;

/**
 * @program: dubbo-pro
 * @description:
 * @author: zhanghz001
 * @create: 2021-02-06 09:35
 **/
//后面改成dubbo的service服务

// @Service(version = "v2.0")//多版本控制
public class UserServiceImpl2 implements UserService {
    public String sayHello() {
        return "hello dubbo!~";
    }
    
    public User findUserById(int id) {
        System.out.println("");
        //查询User对象
        User user = new User(1, "zhangsan-v2.0", "123-v2.0");
        //超时配置
        // try {
        //     Thread.sleep(4000);
        // } catch (Exception e) {
        //     e.printStackTrace();
        // } finally {
        //    
        // }UserServiceImpl不是抽象的
        //异常设置 
        return user;
    }
}
